package com.cskaoyan.javase.oop3._2inner._3static._2notice;

/**
 * 学完成员内部类和静态内部类的语法后,就可以熟练运用它们了
 *
 * @since 11:27
 * @author wuguidong@cskaoyan.onaliyun.com
 */
public class Demo {
    public static void main(String[] args) {
        new Student();
        // 'com.cskaoyan.javase.oop3._2inner._3static._2notice.Demo.this' cannot be referenced from a static context
        // new Teacher();
        Teacher t = new Demo().new Teacher();

        Animal a = new Animal();
        System.out.println(a.num);
    }

    class Teacher {
    }

    static class Animal{
        private int num;
    }
}

class Student {
}
